The URL filtering technology has been widely applied in the communications field, and has become a mature technology in the field of application content security. Based on different categories to which web pages belong, this technology can filter out web pages of set categories, for example, news web pages, according to requirements of a user.
When a connection request is detected by a security device having a URL filtering function, the security device obtains a category to which a URL belongs by remotely querying a categorizing server according to the URL to be connected as requested in the connection request, and then buffers the category in a local memory. In the prior art, if the category to which a URL belongs has been obtained, a filtering operation can be performed directly according to the buffered category to which the URL belongs when the user visits the URL again within an aging time period for the buffering; however, after the aging time period for the buffering expires, the category to which the URL belongs needs to be obtained by means of remote query again.
However, in a practical condition, many web pages include dynamic content; in other words, specific content and the category of the same web page that is requested to be visited may vary within different time periods. In this case, if the categorizing server does not identify variations of the web page content in a timely manner, or the categorizing server has been updated but the category to which the URL belongs, which is buffered on the security device, is still within the aging time period, the category to which the URL belongs cannot be updated in a timely manner. In this case, it is very likely that some URL connection requests that should have been filtered out are allowed to pass through, which causes inaccurate identification of URL categories and further makes it impossible to accurately implement the filtering function.